<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>教程管理</title>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
    <%@include file="../include/commonFile.jsp" %>
</head><body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">
            <div class="layui-tab layui-tab-brief">
                <ul class="layui-tab-title">
                    <li class="<c:if test="${help.type == null || help.type != null && help.type == 0}">layui-this</c:if>">帮助</li>
                    <li class="<c:if test="${help.type != null && help.type == 1}">layui-this</c:if>">技术支持</li>
                </ul>
                <div class="layui-tab-content">
                    <form class="layui-form" action="${ctx}/help/help/list.do" id="myForm" method="post">
                        <input type="hidden" name="pageNo" id="pageNo" value="${page.page}"/>
                        <input type="hidden" name="type" id="help_type" value="${help.type}">
                        <%--<div class="f-search-bar">
                            <div class="search-container">
                                <ul class="search-form-content">
                                    <li class="form-item-inline">
                                        <label class="search-form-lable">序号</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="serialNumber" autocomplete="off" class="layui-input" value="${help.serialNumber}" placeholder="请输入查询序号">
                                        </div>
                                    </li>
                                    <li class="form-item-inline">
                                        <label class="search-form-lable">标题</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="title" autocomplete="off" class="layui-input" value="${help.title}" placeholder="请输入查询标题">
                                        </div>
                                    </li>
                                    <li class="form-item-inline">
                                        <div class="sub-btns">
                                            <a class="layui-btn layui-btn-danger" href="javascript:submitFunction('#myForm')">确定</a>
                                            <a class="layui-btn layui-btn-normal" href="javascript:resetFunction('#myForm')">重置</a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </div>--%>
                    </form>
                    <div class="my-act-list-content">
                        <ul id="view">
                            <table class="layui-table">
                                <colgroup>
                                    <col>
                                    <col width="150">
                                    <col width="250">
                                </colgroup>
                                <thead>
                                <tr>
                                    <th>标题</th>
                                    <th>创建时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach var="help" items="${helpList}">
                                    <c:set var="cHelp" value="${help}" scope="request"/>
                                    <jsp:include page="treeInclude.jsp"></jsp:include>
                                </c:forEach>
                                </tbody>
                            </table>
                        </ul>
                    </div>
                    <div id="page_content" class="page-container"></div>
                </div>
            </div>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
</div>

<%@include file="../include/incScript.jsp"%>
<script type="text/javascript" src="${ctx}/script/common/list.js"></script>
<script type="text/javascript" src="${ctx}/script/common/table_option.js"></script>
<script type="text/javascript">
    var element = null;
    $(function () {
        //加载分页
        loadPageNew({elem: 'page_content', totalCount: '${page.totalCount}', limit: '${page.limit}', page: '${page.page}'});

        layui.use('element', function(){
            element = layui.element;

            element.on('tab',function(e){
                $("#help_type").val(e.index);
                $("#myForm").submit();
            });
        });
    })
</script>
<script type="text/javascript">
    txz.initHeader({
        nav:[{
            name: '教程管理',
            curr: true
        }],
        info:'<span class="f12">共<b id="totalCount">${page.totalCount}</b>条记录</span>',
        btns:[{
            name: '新增',
            icon: 'add',
            href: '${ctx}/help/help/toForm.do'
        }]
    });
</script>
</body>
</html>